<script>
export default {
  name: "ZTabPane",
  data() {
    return {
      id: this.index ?? ZY.rid(3)
    }
  },
  props: {
    label: String,
    index: String
  },
  render(createElement, context) {
    let id = this.id;
    let label = this.label;
    let def = this.$slots.default
    // console.log(this.$scopedSlots)
    if (this.$scopedSlots.label) {
      return (
          <z-fragment>
            <sp-tab value={id}>{this.$scopedSlots.label()}</sp-tab>
            <sp-tab-panel value={id}>{def}</sp-tab-panel>
          </z-fragment>
      )
    }
  }
}
</script>

